package br.com.fiap.enumeration;

public enum TipoAssento{
	
	ECONOMICA(1, "Classe Economica"),
	EXECUTIVA(2, "Classe Executiva");
	
	private Integer key;
	private String label;
	
	private TipoAssento(Integer key, String label) {
		this.key = key;
		this.label = label;
	}

	public Integer getKey() {
		return key;
	}

	public String getLabel() {
		return label;
	}

	public static TipoAssento getEnumByValue(Integer key) {
		
		for (TipoAssento t : TipoAssento.values()) {
			if (t.getKey().equals(key)) {
				return t;
			}
		}
		
		return null;
	}

}
